package zjc.bookkeeping.db;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

import java.util.ArrayList;

public class ConsumptionBean implements Parcelable {
    int consumption_id;
    String consumption_class_name;
    String consumption_remarks;
    float consumption_money;
    String consumption_business;
    String account_id;
    String consumption_method;
    String consumption_time;
    int consumption_year;
    int consumption_month;
    int consumption_day;
    int consumption_kind; //支出 0 收入 1 转账 2
    int consumption_key;

    public ConsumptionBean(int consumption_id, String consumption_class_name, String consumption_remarks, float consumption_money, String consumption_business, String account_id, String consumption_method, String consumption_time, int consumption_year, int consumption_month, int consumption_day, int consumption_kind) {
        this.consumption_id = consumption_id;
        this.consumption_class_name = consumption_class_name;
        this.consumption_remarks = consumption_remarks;
        this.consumption_money = consumption_money;
        this.consumption_business = consumption_business;
        this.account_id = account_id;
        this.consumption_method = consumption_method;
        this.consumption_time = consumption_time;
        this.consumption_year = consumption_year;
        this.consumption_month = consumption_month;
        this.consumption_day = consumption_day;
        this.consumption_kind = consumption_kind;
    }

    public ConsumptionBean() {
    }
    public ConsumptionBean(int consumption_id, String consumption_class_name, String consumption_remarks, float consumption_money, String consumption_business, String consumption_method, String consumption_time, int consumption_year, int consumption_month, int consumption_day, int consumption_kind, int consumption_key) {
        this.consumption_id = consumption_id;
        this.consumption_class_name = consumption_class_name;
        this.consumption_remarks = consumption_remarks;
        this.consumption_money = consumption_money;
        this.consumption_business = consumption_business;
        this.consumption_method = consumption_method;
        this.consumption_time = consumption_time;
        this.consumption_year = consumption_year;
        this.consumption_month = consumption_month;
        this.consumption_day = consumption_day;
        this.consumption_kind = consumption_kind;
        this.consumption_key = consumption_key;
    }
    public ConsumptionBean(int consumption_id, String consumption_class_name, String consumption_remarks, float consumption_money, String consumption_business, String account_id, String consumption_method, String consumption_time, int consumption_year, int consumption_month, int consumption_day, int consumption_kind, int consumption_key) {
        this.consumption_id = consumption_id;
        this.consumption_class_name = consumption_class_name;
        this.consumption_remarks = consumption_remarks;
        this.consumption_money = consumption_money;
        this.consumption_business = consumption_business;
        this.account_id = account_id;
        this.consumption_method = consumption_method;
        this.consumption_time = consumption_time;
        this.consumption_year = consumption_year;
        this.consumption_month = consumption_month;
        this.consumption_day = consumption_day;
        this.consumption_kind = consumption_kind;
        this.consumption_key = consumption_key;
    }

    public int getConsumption_key() {
        return consumption_key;
    }

    public void setConsumption_key(int consumption_key) {
        this.consumption_key = consumption_key;
    }

    public int getConsumption_id() {
        return consumption_id;
    }

    public void setConsumption_id(int consumption_id) {
        this.consumption_id = consumption_id;
    }

    public String getConsumption_class_name() {
        return consumption_class_name;
    }

    public void setConsumption_class_name(String consumption_class_name) {
        this.consumption_class_name = consumption_class_name;
    }

    public String getConsumption_remarks() {
        return consumption_remarks;
    }

    public void setConsumption_remarks(String consumption_remarks) {
        this.consumption_remarks = consumption_remarks;
    }

    public float getConsumption_money() {
        return consumption_money;
    }

    public void setConsumption_money(float consumption_money) {
        this.consumption_money = consumption_money;
    }

    public String getConsumption_business() {
        return consumption_business;
    }

    public void setConsumption_business(String consumption_business) {
        this.consumption_business = consumption_business;
    }

    public String getaccount_id() {
        return account_id;
    }

    public void setaccount_id(String account_id) {
        this.account_id = account_id;
    }

    public String getConsumption_method() {
        return consumption_method;
    }

    public void setConsumption_method(String consumption_method) {
        this.consumption_method = consumption_method;
    }

    public String getConsumption_time() {
        return consumption_time;
    }

    public void setConsumption_time(String consumption_time) {
        this.consumption_time = consumption_time;
    }

    public int getConsumption_year() {
        return consumption_year;
    }

    public void setConsumption_year(int consumption_year) {
        this.consumption_year = consumption_year;
    }

    public int getConsumption_month() {
        return consumption_month;
    }

    public void setConsumption_month(int consumption_month) {
        this.consumption_month = consumption_month;
    }

    public int getConsumption_day() {
        return consumption_day;
    }

    public void setConsumption_day(int consumption_day) {
        this.consumption_day = consumption_day;
    }

    public int getConsumption_kind() {
        return consumption_kind;
    }

    public void setConsumption_kind(int consumption_kind) {
        this.consumption_kind = consumption_kind;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        Log.i("parcelId",consumption_id+"");
        parcel.writeInt(consumption_id);
        parcel.writeString(consumption_class_name);
        parcel.writeString(consumption_remarks);
        parcel.writeFloat(consumption_money);
        parcel.writeString(consumption_business);
        parcel.writeString(account_id);
        parcel.writeString(consumption_method);
        parcel.writeString(consumption_time);
        parcel.writeInt(consumption_year);
        parcel.writeInt(consumption_month);
        parcel.writeInt(consumption_day);
        parcel.writeInt(consumption_kind);
        parcel.writeInt(consumption_key);
    }
    public static final Creator<ConsumptionBean> CREATOR = new Creator<ConsumptionBean>() {
        @Override
        public ConsumptionBean createFromParcel(Parcel parcel) {
            ConsumptionBean consumptionBean = new ConsumptionBean();
            consumptionBean.setConsumption_id(parcel.readInt());
            consumptionBean.setConsumption_class_name(parcel.readString());
            consumptionBean.setConsumption_remarks(parcel.readString());
            consumptionBean.setConsumption_money(parcel.readFloat());
            consumptionBean.setConsumption_business(parcel.readString());
            consumptionBean.setaccount_id(parcel.readString());
            consumptionBean.setConsumption_method(parcel.readString());
            consumptionBean.setConsumption_time(parcel.readString());
            consumptionBean.setConsumption_year(parcel.readInt());
            consumptionBean.setConsumption_month(parcel.readInt());
            consumptionBean.setConsumption_day(parcel.readInt());
            consumptionBean.setConsumption_kind(parcel.readInt());
            consumptionBean.setConsumption_key(parcel.readInt());
            return consumptionBean;
        }

        @Override
        public ConsumptionBean[] newArray(int i) {
            return new ConsumptionBean[i];
        }
    };
}
